package edu.nf.vac.announcement.dao;

import edu.nf.vac.announcement.entity.Announcement;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LQJ
 * @date 2022/3/29
 */
public interface AnnouncementDao {
    /**
     * 查询公告列表
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<Announcement> listAnnouncement(@Param("pageNum") int pageNum,
                                        @Param("pageSize") int pageSize);

    /**
     * 添加公告
     * @param announcement
     */
    void saveAnnouncement(Announcement announcement);

    /**
     * 根据ID来查询公告信息
     * @param id
     * @return
     */
    Announcement getAnnouncementById(int id);

    /**
     * 更新公告信息
     * @param announcement
     */
    void updateAnnouncement(Announcement announcement);
}
